package pt.ua.helpdesk.client;

import java.util.ArrayList;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

public interface ServiceAdministration extends RemoteService {
	
	public String addUser(String username, String pass, String Email, String name, String type) ;
	
	public ArrayList searchUser(String name, String username, String mail, String usertype);
	
	public boolean removeUser(Integer idUser);
	/**
	 * Utility class for simplifying access to the instance of async service.
	 */
	public static class Util {
		private static ServiceAdministrationAsync instance;
		public static ServiceAdministrationAsync getInstance(){
			if (instance == null) {
				instance = (ServiceAdministrationAsync) GWT.create(ServiceAdministration.class);
				ServiceDefTarget target = (ServiceDefTarget) instance;
				target.setServiceEntryPoint(GWT.getModuleBaseURL() + "ServiceAdministration");
			}
			return instance;
		}
	}
}